<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .main1 {
            position: absolute;
            top: 25%;
            left: 25%;
            width: 50%;
            height: 50%;
            background-color: bisque;
        }

        .main2 {
            width: 200px;
            height: 200px;
            background-color: cadetblue;
            padding: 2px;
            /* 消除padding影响本来div大小 */
            box-sizing: border-box; 
            /* border属性 */
            border: 1px solid;
        }
    </style>
</head>
<body>
    <div class="main1">
        <div class="main2">123456789465</div>
    </div>
</body>
</html>